From c24f2b2bec4b701a7a1fc478ca2870e684150d96 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 20 Feb 2007 22:46:21 +0000 Subject: [PATCH] Remove host.create and host.destroy -- these never made any sense. Signed-off-by: Ewan Mellor --- docs/xen-api/xenapi-datamodel.tex | 64 ------------------------------- tools/libxen/include/xen_host.h | 16 +------- tools/libxen/src/xen_host.c | 33 +--------------- tools/python/xen/xend/XendAPI.py | 4 -- 4 files changed, 2 insertions(+), 115 deletions(-) diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index 75932de341..c897baa3a8 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -5378,70 +5378,6 @@ host\_metrics ref value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~create} - -{\bf Overview:} -Create a new host instance, and return its handle. - - \noindent {\bf Signature:} -\begin{verbatim} (host ref) create (session_id s, host record args)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt host record } & args & All constructor arguments \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -host ref -} - - -reference to the newly created object -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~destroy} - -{\bf Overview:} -Destroy the specified host instance. - - \noindent {\bf Signature:} -\begin{verbatim} void destroy (session_id s, host ref self)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt host ref } & self & reference to the object \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -void -} - - - \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/libxen/include/xen_host.h b/tools/libxen/include/xen_host.h index 26ca29d592..e98d7e5bf9 100644 --- a/tools/libxen/include/xen_host.h +++ b/tools/libxen/include/xen_host.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -176,20 +176,6 @@ extern bool xen_host_get_by_uuid(xen_session *session, xen_host *result, char *uuid); -/** - * Create a new host instance, and return its handle. - */ -extern bool -xen_host_create(xen_session *session, xen_host *result, xen_host_record *record); - - -/** - * Destroy the specified host instance. - */ -extern bool -xen_host_destroy(xen_session *session, xen_host host); - - /** * Get all the host instances with the given label. */ diff --git a/tools/libxen/src/xen_host.c b/tools/libxen/src/xen_host.c index 4a79daa90f..591d6f4be1 100644 --- a/tools/libxen/src/xen_host.c +++ b/tools/libxen/src/xen_host.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -159,37 +159,6 @@ xen_host_get_by_uuid(xen_session *session, xen_host *result, char *uuid) } -bool -xen_host_create(xen_session *session, xen_host *result, xen_host_record *record) -{ - abstract_value param_values[] = - { - { .type = &xen_host_record_abstract_type_, - .u.struct_val = record } - }; - - abstract_type result_type = abstract_type_string; - - *result = NULL; - XEN_CALL_("host.create"); - return session->ok; -} - - -bool -xen_host_destroy(xen_session *session, xen_host host) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = host } - }; - - xen_call_(session, "host.destroy", param_values, 1, NULL, NULL); - return session->ok; -} - - bool xen_host_get_by_name_label(xen_session *session, struct xen_host_set **result, char *label) { diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index ca5059157c..9133a0754e 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -680,8 +680,6 @@ class XendAPI(object): return xen_api_success(XendNode.instance().host_metrics_uuid) # object methods - def host_destroy(self, session, host_ref): - return xen_api_error(XEND_ERROR_UNSUPPORTED) def host_disable(self, session, host_ref): XendDomain.instance().set_allow_new_domains(False) return xen_api_success_void() @@ -715,8 +713,6 @@ class XendAPI(object): # class methods def host_get_all(self, session): return xen_api_success((XendNode.instance().uuid,)) - def host_create(self, session, struct): - return xen_api_error(XEND_ERROR_UNSUPPORTED) def host_get_by_name_label(self, session, name): if XendNode.instance().name == name: return xen_api_success((XendNode.instance().uuid,)) -- 2.30.2